const mongoose = require("mongoose");

const categorySchema = new mongoose.Schema(
  {
    name: { 
      type: String, 
      required: true 
    },
    description: { 
      type: String 
    },
    
    subCategories: [{ 
      type: mongoose.Schema.Types.ObjectId, 
      ref: "SubCategory" 
    }],
    status: { 
      type: String, 
      default: "Active" 
    }
  },
  { timestamps: true }
);

module.exports = mongoose.model("Category", categorySchema);
